Skip to content

[3.7] bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375)#13376

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-14514d9-3.7
May 17, 2019
Merged

[3.7] bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375)#13376
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-14514d9-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented May 17, 2019

Copy link
Copy Markdown
Contributor

The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.

Co-Authored-By: Martin Panter vadmium+py@gmail.com
(cherry picked from commit 14514d9)

Co-authored-by: Zackery Spytz zspytz@gmail.com

https://bugs.python.org/issue36946

…pythonGH-13375)

The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.

Co-Authored-By: Martin Panter <vadmium+py@gmail.com>
(cherry picked from commit 14514d9)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@ZackerySpytz and @serhiy-storchaka: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit f02d1a4 into python:3.7 May 17, 2019
@miss-islington miss-islington deleted the backport-14514d9-3.7 branch May 17, 2019 07:33
@miss-islington

Copy link
Copy Markdown
Contributor Author

@ZackerySpytz and @serhiy-storchaka: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants